<!-- <h2 class="contentTitle">uploadify多文件上传</h2> -->

<style type="text/css" media="screen">
.my-uploadify-button {
	background:none;
	border: none;
	text-shadow: none;
	border-radius:0;
}

.uploadify:hover .my-uploadify-button {
	background:none;
	border: none;
}

.fileQueue {
	width: 400px;
	height: 150px;
	overflow: auto;
	border: 1px solid #E5E5E5;
	margin-bottom: 10px;
}
</style>
<script>
var filePath = "";
var fileName = "";
var appRegFilePath = "";
var appRegFileName = "";
$("#paperFileName").val("请选择上传的文件！").show();
$("#appRegFileName").val("请选择上传的文件！").show();
$(function(){
	  $("#uploadPaperFile").on("change",function(){
	        filePath=$(this).val();
	        //alert("filepath====>"+filePath);
	        if(filePath!=""&&(typeof filePath)!='undefined'){
	            var arr=filePath.split('\\');
	            fileName=arr[arr.length-1];
	            $("#paperFileName").val(fileName);
	        }else{
	        	fileName="";
	            $("#paperFileName").val("请选择上传的文件！").show();
	            
	        }
	        return false
	    }); 
	    $("#cancelPaperFile").on("click",function(){
	    	 $("#uploadPaperFile").val(""); 
			 $("#paperFileName").val("请选择上传的文件！");
			 return false
	    });
	     $("#paperFileSubmit").on("click",function(){
	    	//var dataForm = {"filePath":filePath,"fileName":fileName};
	    	if($("#uploadPaperFile").get(0).files.length==0){
	    		alert("请先选择要上传的文件！");
	    	}else{	
	    		var formData1 = new FormData(document.getElementById( "fileUpload" ));
	    		 $.ajax({
	    			 type:"POST",
	    			 url:"applicationBatch/fileUpload",
	    			 data:formData1,
	    			 processData : false,
	    			 dataType:"json",
	    			 contentType : false ,
	    			 traditional:true,
	    			 cache: false,
	    			 success:dialogAjaxDone,
	    			 error: DWZ.ajaxError	 
	    		 });
	    	}
	    	
	    	return false;
	    }); 
})
</script>
<div class="pageFormContent" layoutH="0"><!-- style="margin: 0 10px" -->
	 <form id="fileUpload" action="applicationBatch/fileUpload" method="post" name="f_upload"
	 enctype="multipart/form-data" >
	 <div class="searchBar">
	 	<fieldset>
	 	<legend>申请文件上传</legend>
		<p>
			<input type="file" id="uploadPaperFile" name="files"  multiple="multiple" accept="" style="width:110%;height:24px;">
		</p>
		<p>
			<input type="text" id="paperFileName" name="paperFileName" size="60px" disabled="disabled">
			<span id = "span_id" style="color:blue"></span>
		</p> 
	</fieldset>
	 <div class="subBar">
	 	<ul>
			<li>
				<div class="buttonActive">
					<div class="buttonContent">
						<button id="paperFileSubmit" type="submit" >上传</button>
					</div>
				</div>
			</li>
			<li>
				<div class="buttonActive">
					<div class="buttonContent">
						<button id="cancelPaperFile" type="button" >取消</button>
					</div>
				</div>
			</li>
		</ul>
	 
	 </div>
	 
	 </div>
	 
	</form>
</div>